package cn.stylefeng.guns.modular.business.controller;

import cn.stylefeng.guns.modular.business.service.CanalFirstClassifyService;
import cn.stylefeng.guns.modular.business.service.CanalSecondClassifyService;
import cn.stylefeng.guns.modular.business.service.CanalThreeClassifyService;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@ApiResource(name="分类controller")
public class CanalClassifyController {
    @Resource
    private CanalFirstClassifyService canalFirstClassifyService;
    @Resource
    private CanalSecondClassifyService canalSecondClassifyService;
    @Resource
    private CanalThreeClassifyService canalThreeClassifyService;

//    @GetResource(path = "/canal/findFisrtCalssfiy")
//    public ResponseData findFirstCalssfiy(String name) {
//        CanalFirstClassify canalFirstClassfiy = new CanalFirstClassify();
//        if(!name.isEmpty()) {
//            canalFirstClassfiy.setCanalFirstClassifyName(name);
//        }
//        return new SuccessResponseData(canalFirstClassifyService.findFirstList(canalFirstClassfiy));
//    }
//
//
//    @GetResource(path = "/canal/findSecondCalssfiy")
//    public ResponseData findSecondCalssfiy(String code) {
//        CanalSecondClassify canalSecondClassfiy = new CanalSecondClassify();
//        if(!code.isEmpty()) {
//            canalSecondClassfiy.setCanalFirstClassifyCode(code);
//        }
//        return new SuccessResponseData(canalSecondClassifyService.findSecondList(canalSecondClassfiy));
//    }
//
//    @GetResource(path = "/canal/findThreeCalssfiy")
//    public ResponseData findThreeCalssfiy(String code) {
//        CanalThreeClassify canalThreeClassfiy = new CanalThreeClassify();
//        if(!code.isEmpty()) {
//            canalThreeClassfiy.setCanalSecondClassifyCode(code);
//        }
//        List<CanalThreeClassify> canalThreeClassifyList = canalThreeClassifyService.findThreeList(canalThreeClassfiy);
//
//        return new SuccessResponseData(canalThreeClassifyList);
//    }
}
